package com.atguigu.juc.study.chapter04.locks;

/**
 * @author : leimingchao
 * @date Date : 2022年06月12日 10:55
 */
public class LockSyncDemo {

    Object object = new Object();

    public void m1() {
        synchronized (object) {
            System.out.println("----hello synchronized code block");
        }
    }

    public synchronized void m2() {
        System.out.println("------hello synchronized m2");
    }

    public synchronized void m3() {
        System.out.println("------hello static synchronized m3");
    }

    public static void main(String[] args) {

    }
}
